<template lang="pug">
.cp-plan-edit
  el-dialog(:title="title", :visible="visible", @close="close", :close-on-click-modal="false")
    el-form.pt-form(:inline="true", label-width="72px")
      //- el-row(:gutter="36")
      //-   el-col(:span="24")
      //-     el-form-item.is-required.long-item(label="采购申请单号", label-width="96px")
      //-       el-input(:disabled="true", v-model="formData.order", placeholder="系统自动生成")
      el-row(:gutter="36")
        el-col(:span="12")
          el-form-item.is-required(label="申请人")
            el-input(v-model="formData.applicant", placeholder="请输入内容")
        el-col(:span="12")
          el-form-item(label="供应商")
            el-input(v-model="formData.supply", placeholder="请输入内容")
        el-col(:span="12")
          el-form-item(label="需求部门")
            el-input(v-model="formData.depart", placeholder="请输入内容")
        el-col(:span="12")
          el-form-item(label="成本中心")
            el-input(v-model="formData.costCenter", placeholder="请输入内容")
      el-row(:gutter="36")
        el-col(:span="12")
          el-form-item(label="项目信息")
            el-input(v-model="formData.projectInfo", placeholder="请输入内容")
        el-col(:span="12")
          el-form-item(label="项目用途")
            el-input(v-model="formData.projectUse", placeholder="请输入内容")
      el-row(:gutter="36")
        el-col(:span="24")
          el-form-item(label="备注")
            el-input(v-model="formData.comment", placeholder="请输入内容")
      el-row(:gutter="36")
        el-col(:span="24")
          el-form-item(label="物料信息")
            el-input(v-model="formData.materiels", type="textarea", :rows="3", placeholder="请输入内容")
    .pt-btns
      el-button.dia-btn(type="primary", plain, @click="close") 取消
      el-button.dia-btn.dia-after(type="primary", @click="savePlan") 确定
</template>

<script>
export default {
  name: 'planedit',
  props: {
    title: {
      type: String,
      default: '编辑口述申请'
    },
    visible: Boolean,
    formData: Object
  },
  watch: {
  },
  data() {
    return {
    };
  },
  methods: {
    close () {
      this.$emit('close');
    },
    savePlan () {
      this.$emit('save', this.formData);
    }
  },
  computed: {
  }
};
</script>

<style lang="sass">
.cp-plan-edit
  .pt-form
    .el-form-item
      width: 100%
      margin-right: 0
    .el-form-item__content
      width: calc(100% - 72px)
    .el-form-item__label
      text-align: left
    .el-select
      width: 100%
    .long-item
      .el-form-item__content
        width: calc(100% - 96px)
  .pt-btns
    margin-top: 24px
    text-align: center
    .dia-btn
      width: 80px
    .dia-after
      margin-left: 40px
</style>
